package com.control.qct.businesssteward.httputils;

import android.text.TextUtils;

import com.lzy.okgo.cache.CacheMode;
import com.lzy.okgo.model.HttpHeaders;

import java.io.File;
import java.util.Map;

/**
 * 网络请求基本请求配置参数工具类
 * Created by Administrator on 2018/2/2 0002.
 */

public class RequestConfig {
    private String webAddress = null;//接口地址
    private HttpHeaders headers;//请求头
    private Map<String, String> params = null;//请求参数
    private Map<String,File> file = null;//上传文件
    private Class<?> cls;//解析实体类
    private Class<?> element;//解析arrayList实体类
    private CacheMode cacheMode;
    private String cacheKey;
    private String body;//请求参数


    public RequestConfig() {
    }


    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public HttpHeaders getHeaders() {
        return headers;
    }

    public void setHeaders(HttpHeaders headers) {
        this.headers = headers;
    }

    public String getWebAddress() {
        return webAddress;
    }

    public void setWebAddress(String webAddress) {
        this.webAddress = webAddress;
    }

    public Map<String, String> getParams() {
        return params;
    }

    public void setParams(Map<String, String> params) {
        this.params = params;
    }

    public Map<String, File> getFile() {
        return file;
    }

    public void setFile(Map<String, File> file) {
        this.file = file;
    }

    public Class<?> getCls() {
        return cls;
    }

    public void setCls(Class<?> cls) {
        this.cls = cls;
    }

    public Class<?> getElement() {
        return element;
    }

    public void setElement(Class<?> element) {
        this.element = element;
    }

    public CacheMode getCacheMode() {
        return cacheMode == null ? CacheMode.NO_CACHE : cacheMode;
    }

    public void setCacheMode(CacheMode cacheMode) {
        this.cacheMode = cacheMode;
    }

    public String getCacheKey() {
        return TextUtils.isEmpty(cacheKey) ? "" : cacheKey;
    }

    public void setCacheKey(String cacheKey) {
        this.cacheKey = cacheKey;
    }
}
